﻿#include "CUser.h"
#include "../basic/CSocketMisc.h"

#include <string.h>
#include <stdio.h>

static int send_socket_msg(CUser* thes, CMsg* msg) {
	csocketmisc_send_msg(&thes->socket, msg);
	return 0;
}

int construct_user(CUser* thes, int user_id, unsigned int socket) {
	thes->user_id = user_id;
	thes->socket = socket;
	thes->current = 0;
	thes->next = 0;
	thes->st = USER_ST_NONE;
	thes->send_socket_msg = send_socket_msg;
	return 0;
}

